import { http } from '@/utils/http/axios';

/**
 * @description: 地区列表树
 */
export function getAreaTree() {
  return http.request({
    url: '/sys/area/tree',
    method: 'GET',
  });
}
/**
 * @description: 地区详情
 */
export function getAreaInfo(params) {
  return http.request({
    url: '/sys/area/info',
    method: 'GET',
    params,
  });
}
/**
 * @description: 地区新增
 */
export function createArea(data) {
  return http.request({
    url: '/sys/area',
    method: 'POST',
    data,
  });
}
/**
 * @description: 地区修改
 */
export function updateArea(data) {
  return http.request({
    url: '/sys/area',
    method: 'PUT',
    data,
  });
}
/**
 * @description: 删除地区
 */
export function deleteArea(params) {
  return http.request({
    url: '/sys/area',
    method: 'DELETE',
    params,
  });
}
